An extended comparative study of language support for generic programming

نویسندگان

  • Ronald Garcia
  • Jaakko Järvi
  • Andrew Lumsdaine
  • Jeremy G. Siek
  • Jeremiah Willcock
چکیده

Many modern programming languages support basic generics, sufficient to implement type-safe polymorphic containers. Some languages have moved beyond this basic support, and in doing so have enabled a broader, more powerful form of generic programming. This paper reports on a comprehensive comparison of facilities for generic programming in eight programming languages: C++, Standard ML, Objective Caml, Haskell, Eiffel, Java, C# (with its proposed generics extension), and Cecil. By implementing a substantial example in each of these languages, we illustrate how the basic roles of generic programming can be represented in each language. We also identify eight language properties that support this broader view of generic programming: support for multi-type concepts, multiple constraints on type parameters, convenient associated type access, constraints on associated types, retroactive modeling, type aliases, separate compilation of algorithms and data structures, and implicit argument type deduction for generic algorithms. We find that these features are necessary to avoid awkward designs, poor maintainability, and painfully verbose code. As languages increasingly support generics, it is important that language designers understand the features necessary to enable the effective use of generics and that their absence can cause difficulties for programmers.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Comparative Study of Generic Structure of Applied Linguistics and Chemistry Research Articles: The Case of Discussions

This genre-based study investigated the cross-disciplinary variations in the rhetorical structure of the Discussion sections of 104 applied linguistics and chemistry research articles (RAs), drawing upon Basturkmen’s (2009, 2012) framework and taking into account the new insights proposed by Bhatia (2004), Shehzad (2008), and Lim (2012). To this end, in addition to collecting quantitative data ...

متن کامل

Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey

One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...

متن کامل

A Generic Analysis of the conclusion section of Research Articles in the field of sociology: A Comparative study

This paper reported on a genre-driven comparative study, which aimed to identify the generic moves in the conclusion sections of twenty research articles in the field of sociology written in the two codes of Persian and English. To meet this purpose, the researchers employed Moritz, Meurer, and Dellagnelo's model, which was set within the Swalesian framework of genre analysis. The analysis was ...

متن کامل

A Comparative Study of Introduction and Discussion sections of Sub-disciplines of Applied Linguistics Research Articles

Much has been written in the past few decades about the reasons why many research articles (RAs) do not find their ways into well-established academic journals. While some doubt viable comparison between "big" English-language journals (to use Swales' 2004 words) or international journals (IJs) and "small" ones published in other local languages, there is still a good many reasons to hope for t...

متن کامل

A New Method For Solving Linear Bilevel Multi-Objective Multi-Follower Programming Problem

Linear bilevel programming is a decision making problem with a two-level decentralized organization. The leader is in the upper level and the follower, in the lower level. This study addresses linear bilevel multi-objective multi-follower programming (LB-MOMFP) problem, a special case of linear bilevel programming problems with one leader and multiple followers where each decision maker has sev...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Funct. Program.

دوره 17  شماره 

صفحات  -

تاریخ انتشار 2007